package com.cdut.hwadeefsc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

/**
 * 学生活动表
 * @TableName activities
 */
@TableName(value = "activities")
public class activities { // 类名首字母大写
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 关联的班级ID (关联 organizations.id)
     */
    private Long classId;

    /**
     * 发布老师ID (关联 users.id)
     */
    private Long authorId; // 与数据库author_id对应

    /**
     * 活动标题
     */
    @TableField("activity_title") // 明确映射数据库字段
    private String activityTitle; // 原title改为activityTitle，与数据库字段对应

    /**
     * 活动文字描述
     */
    @TableField("activity_content")
    private String activityContent; // 原content改为activityContent，与数据库字段对应

    /**
     * 活动日期时间
     */
    @TableField("activity_date")
    private Date activityDate;

    /**
     * 活动地点
     */
    private String location;

    /**
     * 活动状态（进行中、已结束、已取消）
     */
    private String status;

    /**
     * 活动照片URL（多个用逗号分隔）
     */
    @TableField("photo_urls")
    private String photoUrls;

    /**
     * 发布时间
     */
    @TableField("created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    private Date updatedAt;

    // Getter 和 Setter 方法（同步更新字段名）
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public Long getClassId() { return classId; }
    public void setClassId(Long classId) { this.classId = classId; }

    public Long getAuthorId() { return authorId; }
    public void setAuthorId(Long authorId) { this.authorId = authorId; }

    public String getActivityTitle() { return activityTitle; }
    public void setActivityTitle(String activityTitle) { this.activityTitle = activityTitle; }

    public String getActivityContent() { return activityContent; }
    public void setActivityContent(String activityContent) { this.activityContent = activityContent; }

    public Date getActivityDate() { return activityDate; }
    public void setActivityDate(Date activityDate) { this.activityDate = activityDate; }

    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }

    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }

    public String getPhotoUrls() { return photoUrls; }
    public void setPhotoUrls(String photoUrls) { this.photoUrls = photoUrls; }

    public Date getCreatedAt() { return createdAt; }
    public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }

    public Date getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }

    // equals、hashCode、toString方法同步更新字段名（略，保持自动生成逻辑）
}